﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace MvcBlog.Models
{
    public class Post
    {
        public int PostID { get; set; }
        [MaxLength(50)]
        public string Title { get; set; }
        [DataType(DataType.MultilineText)]
        public string Content { get; set; }
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
        public DateTime PostDate { get; set; }
        public int? CategoryID { get; set; }
        
        public virtual PostCategory Category { get; set;}
        public virtual ICollection<Comment> Comments { get; set; }
    }


}